home *** CD-ROM | disk | FTP | other *** search
/ The Trig Explorer / The Trig Explorer.iso / mac / Explorer / SINE-PUZ.dxr / 00076.ls < prev    next >
Encoding:
Text File  |  1998-07-22  |  5.4 KB  |  197 lines

  1. global S6, S7, S8, S9, S10, S11, AA, AB, AC, BA, BB, BC, CA, CB, CC, DA, DB, DC
  2.  
  3. on enterFrame
  4.   global selection
  5.   if selection = "A" then
  6.     set n to 53
  7.   end if
  8.   if selection = "B" then
  9.     set n to 54
  10.   end if
  11.   if selection = "C" then
  12.     set n to 55
  13.   end if
  14.   if selection = "D" then
  15.     set n to 56
  16.   end if
  17.   if rollOver(15) then
  18.     set the castNum of sprite 15 to n
  19.     PS6()
  20.   end if
  21.   if rollOver(16) then
  22.     set the castNum of sprite 16 to n
  23.     PS6()
  24.   end if
  25.   if rollOver(17) then
  26.     set the castNum of sprite 17 to n
  27.     PS8()
  28.   end if
  29.   if rollOver(18) then
  30.     set the castNum of sprite 18 to n
  31.     PS8()
  32.   end if
  33.   if rollOver(19) then
  34.     set the castNum of sprite 19 to n
  35.     PS10()
  36.   end if
  37.   if rollOver(20) then
  38.     set the castNum of sprite 20 to n
  39.     PS10()
  40.   end if
  41.   if rollOver(21) then
  42.     set the castNum of sprite 21 to n
  43.     PS7()
  44.   end if
  45.   if rollOver(22) then
  46.     set the castNum of sprite 22 to n
  47.     PS7()
  48.   end if
  49.   if rollOver(23) then
  50.     set the castNum of sprite 23 to n
  51.     PS9()
  52.   end if
  53.   if rollOver(24) then
  54.     set the castNum of sprite 24 to n
  55.     PS9()
  56.   end if
  57.   if rollOver(25) then
  58.     set the castNum of sprite 25 to n
  59.     PS11()
  60.   end if
  61.   if rollOver(26) then
  62.     set the castNum of sprite 26 to n
  63.     PS11()
  64.   end if
  65.   updateStage()
  66. end
  67.  
  68. on exitFrame
  69.   go("Ploop")
  70. end
  71.  
  72. on PS6
  73.   set xA to the left of sprite 6 + 1
  74.   set yA to the bottom of sprite 6 - 48
  75.   set A1 to value(char 1 of S6 & "A")
  76.   set B1 to value(char 1 of S6 & "B")
  77.   set C1 to value(char 1 of S6 & "C")
  78.   set A2 to value(char 2 of S6 & "A")
  79.   set B2 to value(char 2 of S6 & "B")
  80.   set C2 to value(char 2 of S6 & "C")
  81.   set the trails of sprite 27 to 1
  82.   repeat with n = 1 to 89
  83.     set x to n * 2.0 * PI / 180.0
  84.     set x1 to (n * 2) + xA
  85.     set y1 to yA - ((18.0 * A1 * sin((B1 * x) + (C1 * PI / 180.0))) + (18.0 * A2 * sin((B2 * x) + (C2 * PI / 180.0))))
  86.     set the locH of sprite 27 to x1
  87.     set the locV of sprite 27 to y1
  88.     updateStage()
  89.   end repeat
  90.   set the trails of sprite 27 to 0
  91. end
  92.  
  93. on PS7
  94.   set xA to the left of sprite 7 + 1
  95.   set yA to the bottom of sprite 7 - 48
  96.   set A1 to value(char 1 of S7 & "A")
  97.   set B1 to value(char 1 of S7 & "B")
  98.   set C1 to value(char 1 of S7 & "C")
  99.   set A2 to value(char 2 of S7 & "A")
  100.   set B2 to value(char 2 of S7 & "B")
  101.   set C2 to value(char 2 of S7 & "C")
  102.   set the trails of sprite 28 to 1
  103.   repeat with n = 1 to 89
  104.     set x to n * 2.0 * PI / 180.0
  105.     set x1 to (n * 2) + xA
  106.     set y1 to yA - ((18.0 * A1 * sin((B1 * x) + (C1 * PI / 180.0))) + (18.0 * A2 * sin((B2 * x) + (C2 * PI / 180.0))))
  107.     set the locH of sprite 28 to x1
  108.     set the locV of sprite 28 to y1
  109.     updateStage()
  110.   end repeat
  111.   set the trails of sprite 28 to 0
  112. end
  113.  
  114. on PS8
  115.   set xA to the left of sprite 8 + 1
  116.   set yA to the bottom of sprite 8 - 48
  117.   set A1 to value(char 1 of S8 & "A")
  118.   set B1 to value(char 1 of S8 & "B")
  119.   set C1 to value(char 1 of S8 & "C")
  120.   set A2 to value(char 2 of S8 & "A")
  121.   set B2 to value(char 2 of S8 & "B")
  122.   set C2 to value(char 2 of S8 & "C")
  123.   set the trails of sprite 29 to 1
  124.   repeat with n = 1 to 89
  125.     set x to n * 2.0 * PI / 180.0
  126.     set x1 to (n * 2) + xA
  127.     set y1 to yA - ((18.0 * A1 * sin((B1 * x) + (C1 * PI / 180.0))) + (18.0 * A2 * sin((B2 * x) + (C2 * PI / 180.0))))
  128.     set the locH of sprite 29 to x1
  129.     set the locV of sprite 29 to y1
  130.     updateStage()
  131.   end repeat
  132.   set the trails of sprite 29 to 0
  133. end
  134.  
  135. on PS9
  136.   set xA to the left of sprite 9 + 1
  137.   set yA to the bottom of sprite 9 - 48
  138.   set A1 to value(char 1 of S9 & "A")
  139.   set B1 to value(char 1 of S9 & "B")
  140.   set C1 to value(char 1 of S9 & "C")
  141.   set A2 to value(char 2 of S9 & "A")
  142.   set B2 to value(char 2 of S9 & "B")
  143.   set C2 to value(char 2 of S9 & "C")
  144.   set the trails of sprite 30 to 1
  145.   repeat with n = 1 to 89
  146.     set x to n * 2.0 * PI / 180.0
  147.     set x1 to (n * 2) + xA
  148.     set y1 to yA - ((18.0 * A1 * sin((B1 * x) + (C1 * PI / 180.0))) + (18.0 * A2 * sin((B2 * x) + (C2 * PI / 180.0))))
  149.     set the locH of sprite 30 to x1
  150.     set the locV of sprite 30 to y1
  151.     updateStage()
  152.   end repeat
  153.   set the trails of sprite 30 to 0
  154. end
  155.  
  156. on PS10
  157.   set xA to the left of sprite 10 + 1
  158.   set yA to the bottom of sprite 10 - 48
  159.   set A1 to value(char 1 of S10 & "A")
  160.   set B1 to value(char 1 of S10 & "B")
  161.   set C1 to value(char 1 of S10 & "C")
  162.   set A2 to value(char 2 of S10 & "A")
  163.   set B2 to value(char 2 of S10 & "B")
  164.   set C2 to value(char 2 of S10 & "C")
  165.   set the trails of sprite 31 to 1
  166.   repeat with n = 1 to 89
  167.     set x to n * 2.0 * PI / 180.0
  168.     set x1 to (n * 2) + xA
  169.     set y1 to yA - ((18.0 * A1 * sin((B1 * x) + (C1 * PI / 180.0))) + (18.0 * A2 * sin((B2 * x) + (C2 * PI / 180.0))))
  170.     set the locH of sprite 31 to x1
  171.     set the locV of sprite 31 to y1
  172.     updateStage()
  173.   end repeat
  174.   set the trails of sprite 31 to 0
  175. end
  176.  
  177. on PS11
  178.   set xA to the left of sprite 11 + 1
  179.   set yA to the bottom of sprite 11 - 48
  180.   set A1 to value(char 1 of S11 & "A")
  181.   set B1 to value(char 1 of S11 & "B")
  182.   set C1 to value(char 1 of S11 & "C")
  183.   set A2 to value(char 2 of S11 & "A")
  184.   set B2 to value(char 2 of S11 & "B")
  185.   set C2 to value(char 2 of S11 & "C")
  186.   set the trails of sprite 32 to 1
  187.   repeat with n = 1 to 88
  188.     set x to n * 2.0 * PI / 180.0
  189.     set x1 to (n * 2) + xA
  190.     set y1 to yA - ((18.0 * A1 * sin((B1 * x) + (C1 * PI / 180.0))) + (18.0 * A2 * sin((B2 * x) + (C2 * PI / 180.0))))
  191.     set the locH of sprite 32 to x1
  192.     set the locV of sprite 32 to y1
  193.     updateStage()
  194.   end repeat
  195.   set the trails of sprite 32 to 0
  196. end
  197.